import Vapor
import Fluent

final class ReferenceImage: Model, Content {
    
    static let schema: String = "referenceimage"
    
    @ID
    var id: UUID?
    
    @Field(key: "fileOcId")
    var fileOcId: String?
    
    @Field(key: "imageShouldBeDeleted")
    var imageShouldBeDeleted: Bool
    
    @Field(key: "isChecked")
    var isChecked: Bool
    
    @Field(key: "canBeShownInExhibitionMode")
    var canBeShownInExhibitionMode: Bool
    
    @Field(key: "productGroupBreedersBroilers")
    var productGroupBreedersBroilers: Bool
        
    @Field(key: "productGroupBreedersLayers")
    var productGroupBreedersLayers: Bool
    
    @Field(key: "productGroupBroilersColony")
    var productGroupBroilersColony: Bool
        
    @Field(key: "productGroupLayersAlternative")
    var productGroupLayersAlternative: Bool
        
    @Field(key: "productGroupLayersConventional")
    var productGroupLayersConventional: Bool
        
    @Field(key: "productGroupLayersEnriched")
    var productGroupLayersEnriched: Bool
        
    @Field(key: "productGroupManureComposting")
    var productGroupManureComposting: Bool
    
    @Field(key: "productGroupManureDrying")
    var productGroupManureDrying: Bool
    
    @Field(key: "productGroupManureTransport")
    var productGroupManureTransport: Bool
    
    @Field(key: "productGroupOthersEggHandling")
    var productGroupOthersEggHandling: Bool
    
    @Field(key: "productGroupOthersFeedHandling")
    var productGroupOthersFeedHandling: Bool
    
    @Field(key: "productGroupOthersOthers")
    var productGroupOthersOthers: Bool
    
    @Field(key: "productGroupOthersVentilation")
    var productGroupOthersVentilation: Bool
    
    @Field(key: "productGroupPulletsAlternative")
    var productGroupPulletsAlternative: Bool
    
    @Field(key: "productGroupPulletsConventional")
    var productGroupPulletsConventional: Bool
    
    @Parent(key: "referenceID")
    var reference: Reference
    
    
    init() {}
    
    init(_ id: UUID? = nil, _ fileOcId: String, _ imageShouldBeDeleted: Bool, _ isChecked: Bool,
         _ canBeShownInExhibitionMode: Bool,
         _ productGroupBreedersBroilers: Bool,
         _ productGroupBreedersLayers: Bool,
         _ productGroupBroilersColony: Bool,
         _ productGroupLayersAlternative: Bool,
         _ productGroupLayersConventional: Bool,
         _ productGroupLayersEnriched: Bool,
         _ productGroupManureComposting: Bool,
         _ productGroupManureDrying: Bool,
         _ productGroupManureTransport: Bool,
         _ productGroupOthersEggHandling: Bool,
         _ productGroupOthersFeedHandling: Bool,
         _ productGroupOthersOthers: Bool,
         _ productGroupOthersVentilation: Bool,
         _ productGroupPulletsAlternative: Bool,
         _ productGroupPulletsConventional: Bool,
         _ referenceID: Reference.IDValue) {
        self.id = id
        self.fileOcId = fileOcId
        self.imageShouldBeDeleted = imageShouldBeDeleted
        self.isChecked = isChecked
        self.canBeShownInExhibitionMode = canBeShownInExhibitionMode
        self.productGroupBreedersBroilers = productGroupBreedersBroilers
        self.productGroupBreedersLayers = productGroupBreedersLayers
        self.productGroupBroilersColony = productGroupBroilersColony
        self.productGroupLayersAlternative = productGroupLayersAlternative
        self.productGroupLayersConventional = productGroupLayersConventional
        self.productGroupLayersEnriched = productGroupLayersEnriched
        self.productGroupManureComposting = productGroupManureComposting
        self.productGroupManureDrying = productGroupManureDrying
        self.productGroupManureTransport = productGroupManureTransport
        self.productGroupOthersEggHandling = productGroupOthersEggHandling
        self.productGroupOthersFeedHandling = productGroupOthersFeedHandling
        self.productGroupOthersOthers = productGroupOthersOthers
        self.productGroupOthersVentilation = productGroupOthersVentilation
        self.productGroupPulletsAlternative = productGroupPulletsAlternative
        self.productGroupPulletsConventional = productGroupPulletsConventional
        self.$reference.id = referenceID
    }

    
}
